export const monthList = (curMonth: number) => {
  const formatMonth = (month: number) => {
    return month.toString().padStart(2, '0')
  }
  let previous: Array<string> = [];
  let next: Array<string> = [];

  for (let i = 1; i <= 2; i++) {
    let month = curMonth - i;
    if (month <= 0) {
      month += 12;
    }
    previous.unshift(formatMonth(month))
  }

  previous.push(formatMonth(curMonth))

  for (let i = 1; i <= 3; i++) {
    let month = curMonth + i;
    if (month > 12) {
      month -= 12;
    }
    next.push(formatMonth(month))
  }

  return previous.concat(next)
}